package com.yike.product.convert;

import com.yike.product.entity.Goods;
import com.yike.product.param.AddGoodsParam;
import com.yike.product.param.UpdateGoodsParam;
import com.yike.product.vo.GoodsCustomVo;
import com.yike.product.vo.GoodsVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface GoodsCustomConvert {

    GoodsCustomConvert INSTANCE = Mappers.getMapper(GoodsCustomConvert.class);

    List<GoodsCustomVo> convert(List<Goods> goodsList);

    @Mapping(source = "sellPrice", target = "price")
    GoodsCustomVo convert(Goods goods);

}
